package com.ctbu.score.service.impl;

import com.ctbu.score.domain.Admin;
import com.ctbu.score.mapper.AdminMapper;
import com.ctbu.score.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 管理员服务实现类
 **/
@Service
public class AdminServiceImpl implements AdminService {

    @Autowired
    private AdminMapper adminMapper;

    /**
     * 管理员登录验证
     *
     * @param adminId   管理员账号
     * @param adminPass 管理员密码
     * @return 验证通过返回管理员对象，否则返回null
     */
    @Override
    public Admin adminLogin(String adminId, String adminPass) {
        return adminMapper.selectAdminByIdAndPass(adminId, adminPass);
    }
}

